import store from '@/store'
import bus from "@/bus"

export default class Base {
  bus = bus
  store = store
  constructor() {

  }

  
  // /**
  //  * 判断消息来源
  //  * @param {*String} userId - 传入用户ID
  //  */ 
  // isMe(userId) {
  //   return userStore.userInfo.user_id == userId
  // }

  isOpen(id) {
    return this.store.state?.openRoom?.patient_id === id
  }

  isOpenShow(id) {
    return this.isOpen(id) && this.store.state.isShowChat
  }
}